1. Field of the Invention
The present invention relates to a method of configuring a control algorithm being executable by a controller for controlling a plant in real-time, a controller for controlling a plant in real-time, and a control algorithm generator for generating a control algorithm being executable and configurable by a controller.
Such controllers are used especially in the mechanical domain, for example for controlling automotive engines, robots, construction machinery, avionics etc.
2. Description of the Related Art
A controller for controlling a plant in real-time is known, for example, from US 2004/0133879. This prior art document discloses a controller being able to execute a software component comprising a control model according to which a plant is controlled.
The article “An Aspect-Oriented Development Method for Embedded Control Systems with Time-Triggered and Event-Triggered Processing” by Takanori Yokoyama, published in the proceedings of the 11th IEEE Real-Time and Embedded Technology and Applications Symposium, pages 302-311, 2005, discloses a method for improving the reusability of control models and source code for controllers being able to execute software components comprising a control algorithm. However, in spite of this method, reusing software components across different controllers still entails a lot of effort.
The general prior art will be discussed in more detail with reference to the FIGS. 1-4. FIG. 1 shows a generic control system comprising a controller 101 that controls a plant 102 (control target) and receives feedback information from the plant 102 such that the controller 101 is able to determine adequate control signals for controlling the plant 102.
FIG. 2 depicts a controller more closely. A controller comprises a hardware 202 and software 201. The software 201 comprises a real-time operating system 206 and software components that may comprise a control algorithm (software component A 203, software component B 204, and further software components (software component n 205)). The real-time operating system activates the software components periodically and/or based on events in order to execute the control algorithms.
In the prior art, such controllers as depicted in FIG. 2 are in general configured by the method shown in FIG. 3. First, a suitable control algorithm is provided in differential equations (step 301). This control algorithm in differential equations is then converted into difference equations (step 302), such that the control algorithm can be executed by a digital controller. Afterwards, the time period of the control algorithm is set manually (step 303). Afterwards, the control algorithm is executed in step 304.
FIG. 4 shows further important details of a controller 101 of the prior art. The shown controller comprises a software component A 410 that comprises a control algorithm 412 and parameters 411 that define the activation period for the control algorithm. Furthermore, the shown controller 101 comprises a software component B 420 with according parameters 421 for the activation period of the control algorithm 422. In addition, the shown controller 101 comprises a software component C 430 comprising a control algorithm 432 whose activation period is defined by the parameters for activation period 431.
The control algorithms 412, 422, 432 of the software components A-C 410, 420, 430 are activated by according activators 441, 442, 443. These activators are comprised in a periodic task scheduler 440 that is comprised in the real-time operation system. Each activator is activated by a clock 450. The activation periods are specified in the parameters for activation period 444.
The parameters for activation period of the software components 411, 421, 431 are configured manually in accordance with the requirements of the plant to be controlled. When the plant that is controlled by the according software component changes, the software component has to be reconfigured. This reconfiguration work decreases the benefit of reusing control software across different plants.